package com.tenement.service;

import cn.hutool.json.JSONObject;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.tenement.common.Axios;
import com.tenement.dto.SelectDto;
import com.tenement.entity.User;
import com.tenement.entity.UserTenement;
import com.tenement.vo.QueryVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 *  服务层。
 *
 * @author BertXie
 * @since 1.0.1
 */
public interface UserService extends IService<User> {


   Map<String,Object> login(String account, String password);

   Map<String,Object> miniLogin(String account);

   boolean loginOut(HttpServletRequest req);

   int workerOperator(User user);


   int add(User user);


   boolean banUser(String account);

   Page<User> list(QueryVo queryVo);

   User byAccount(String account);

   List<SelectDto> adminBindSelect(String keyWord);

   boolean bindProperty(UserTenement userTenement);

   Page<User> worker(QueryVo queryVo);

   int removeWorker(List<Long> ids);

   int residentOperate(Long houseId,User user);

   List<User> repairWorker(String word);

   String twins();

   Map<String,Object> statistics(Long userId);

   long newToday();

   boolean updatePersonalInfo(User user);

   boolean changePwd(JSONObject req);
}
